package com.neusoft.controller;

import com.neusoft.domain.Result;
import com.neusoft.utils.UploadUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class CommonController {

    @PostMapping("/upload")
    public Result<String> upload(MultipartFile file){
        String url = UploadUtils.upload(file);
        return Result.success(url);
    }
}
